/**
 * 
 */
package com.hexacta.hrs.domain.feedback;

import java.util.List;

import org.vectrics.recruiter.job.*;

/**
 * @author epereyra
 * 
 */
public class FeedbackPeriodRole {
	
	private JobFunction role;
	private boolean closed;
	private String period;
	private List<FeedbackPeriod> feedbackPeriods;

	
	public FeedbackPeriodRole(JobFunction role, boolean close, String period) {
		super();
		this.role = role;
		this.closed = close;
		this.period = period;
	}

	public JobFunction getRole() {
		return role;
	}

	public void setRole(JobFunction role) {
		this.role = role;
	}

	public boolean isClosed() {
		return closed;
	}

	public void setClosed(boolean close) {
		this.closed = close;
	}

	public String getPeriod() {
		return period;
	}

	public void setPeriod(String period) {
		this.period = period;
	}

	public List<FeedbackPeriod> getFeedbackPeriods() {
		return feedbackPeriods;
	}

	public void setFeedbackPeriods(List<FeedbackPeriod> feedbackPeriods) {
		this.feedbackPeriods = feedbackPeriods;
	}

	public boolean getHasAnyEmptyFeedback() {
		for (FeedbackPeriod feedbackPeriod : feedbackPeriods) {
			for (Feedback feedback : feedbackPeriod.getFeedbacks()) {
				if (feedback.isEmpty()) {
					return true;
				} else {
					continue;
				}
			}
		}
		return false;
	}
}
